<template>
  <div>
    <nav class="navbar navbar-expand-sm bg-light navbar-light fixed-top">
      <a class="navbar-brand" href="#" onclick="this.$router.back(-1)">返回</a>
    </nav>
    <div class="card">
      <div class="card-body">
        <p
          v-for="line in description"
          :key="line.id"
          :class="{'card-title description-title':(line.type=='title'),'card-text description-plain':(line.type=='plain')}"
        >{{line.text}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DescriptionView",
  computed: {
    description() {
      return this.$store.state.description;
    }
  }
};
</script>

<style scoped>
.description-title {
  font-weight: bold;
}
.description-plain {
  font-size: 0.85em;
}
</style>